﻿using GameFramework;
using UnityEngine;
using UnityGameFramework.Runtime;

public class CratePanel : UIFormLogic
{
    ProcedureCrate procedureCrate;
    protected internal override void OnOpen(object userData)
    {
        base.OnOpen(userData);
        procedureCrate = (ProcedureCrate)userData;
    }

    public void OkBtnClick()
    {
        //把玩家的名称发送给服务器      "二狗子"是玩家名称（你们需要获取文本框里面用户输入的文字）
        EventDispatcher.TriggerEvent<string>(EventKey.CSOnSendPlayerNameToServer, "二狗子");
        procedureCrate.EnterGame();
    }

}
